package com.inifitness.common.annotations;


import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.inifitness.common.constants.GlobalConstants;

/**
 * 防重提交注解
 *
 * @author sunjinfeng
 * @since 2023/5/9
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface PreventDuplicateResubmit {

  /**
   * 防重提交锁过期时间(秒)
   * <p>
   * 默认5秒内不允许重复提交
   */
  int expire() default GlobalConstants.DEFAULT_RESUBMIT_INTERVAL;

}
